<%--
  Created by IntelliJ IDEA.
  User: 梁玉杰
  Date: 2021/5/26
  Time: 19:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录页面</title>
</head>
<body>
<h1>账号与密码登录</h1>
    <form action="${pageContext.request.contextPath}/login" method="post">
        <br>
    <span>${error }</span>
        <br>
        账号：<input type="text" name="email" placeholder="请输入账号">
        <br><br>
        密码：<input type="password" name="password" placeholder="请输入密码">
        <br><br><br>
        <input type="submit" value="登录">

        <input type="reset" value="重置">
    </form>

    <h3>
   <%-- <a href="${pageContext.request.contextPath}/jsp/login1.jsp">使用手机号码与密码登录</a>--%>
    </h3>

<script type="text/javascript">


    (function() {
        var varTest;
        let letTest;
        console.log(varTest); //输出undefined
        console.log(letTest); //输出undefined
    }());


    (function() {
          var s = {
              "name": "feiyue",
              "level": 99,
              "age": 18,
              "skillList": [
                  {
                      "id": 1,
                      "name": "天下无双",
                      "damage": "123"
                  },
                  {
                      "id": 2,
                      "name": "雌雄难辨",
                      "damage": "182"
                  },
                  {
                      "id": 3,
                      "name": "暗流涌动",
                      "damage": "89"
                  }
              ]
          }

    console.log("年龄：：：："+s.age)
        for (var i = 0;i<s.skillList.length;i++){
            // console.log(s.skillList[i].id);
            if (s.skillList[i].id == 2){
                console.log("id为2的：：：："+s.skillList[i].name)
            }
        }
    // console.log(s.)

        var d = {
            "company_name": "北工商",
            "level": 99,
            "age": 18,
            "dept": [
                {
                    "name": "张国立",
                    "sex": "男",
                    "email": "zhangguoli@123.com",
                    "url": "./img/1.jpg"
                },
                {
                    "name": "张铁林",
                    "sex": "男",
                    "email": "zhangtieli@123.com",
                    "url": "./img/2.jpg"
                },
                {
                    "name": "邓婕",
                    "sex": "女",
                    "email": "zhenjie@123.com",
                    "url": "./img/3.jpg"
                },
                {
                    "name": "张国立",
                    "sex": "男",
                    "email": "zhangguoli@123.com",
                    "url": "./img/4.jpg"
                },
                {
                    "name": "张铁林",
                    "sex": "男",
                    "email": "zhangtieli@123.com",
                    "url": "./img/5.jpg"
                },
                {
                    "name": "邓婕",
                    "sex": "女",
                    "email": "zhenjie@123.com",
                    "url": "./img/6.jpg"
                }
            ]
        }

        for (var i = 0;i < d.dept.length;i++){
            if (d.dept[i].name == "张铁林"){
                console.log(d.dept[i].name)
                console.log(d.dept[i].email)
                console.log(d.dept[i].sex)
            }
        }


    }());
</script>



</body>
</html>
